package com.example.demo_one

import android.os.Bundle
import android.widget.TextView
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity

class CommonCompActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_common_comp)


        // 1. 获取布局文件中的文本组件
        val tv_title = findViewById<TextView>(R.id.textView2)
        tv_title.text = "我是动态赋值的"

    }
}